package com.jike.mahjong.task.scheduled;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * Created by star on 2016/12/30.
 */
public class ScheduledTest {

    public static void main(String[] args ){


        ScheduledExecutorService service= Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors() * 2);
        ScheduledJob job=new ScheduledJob();
        service.scheduleAtFixedRate(job,1,1,TimeUnit.SECONDS);

    }
}
